package com.forest.datachangetracker.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 数据库类型.
 */
@Getter
@AllArgsConstructor
public enum DbTypeEnum {
    MYSQL("mysql", "mysql数据库"),
    XU_GU("xugudb", "虚谷数据库"),
    ;

    private String code;

    private String desc;

    public static DbTypeEnum getDbType(String code) {
        for (DbTypeEnum value : values()) {
            if (value.getCode().equalsIgnoreCase(code)) {
                return value;
            }
        }
        return null;
    }
}
